<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var name = "222";
        var a = {
            name:"111",
            say:function() {
                console.log(this.name)
            }
        };

        var foo = a.say;
        foo()
        a.say()


    </script>
</body>
</html>